//
//  SPLiveTableViewCell.m
//  panzer
//
//  Created by 还带大道 on 2018/10/20.
//  Copyright © 2018年 还带大道. All rights reserved.
//

#import "SPLiveTableViewCell.h"

@interface SPLiveTableViewCell()

@property (weak, nonatomic) IBOutlet UIView *bgView;
@property (weak, nonatomic) IBOutlet UIImageView *icon;
@property (weak, nonatomic) IBOutlet UILabel *title;
@property (weak, nonatomic) IBOutlet UILabel *time;
@property (weak, nonatomic) IBOutlet UIImageView *head;
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UIImageView *genderIcon;
@property (weak, nonatomic) IBOutlet UILabel *age;
@property (weak, nonatomic) IBOutlet UILabel *des;
@property (weak, nonatomic) IBOutlet UILabel *des1;
@property (weak, nonatomic) IBOutlet UILabel *des2;
@property (weak, nonatomic) IBOutlet UILabel *des3;

@end

@implementation SPLiveTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    _bgView.backgroundColor = [UIColor whiteColor];
    _bgView.layer.shadowColor = RZ_COLOR_ALPHA(226, 226, 226, 0.63).CGColor;
    _bgView.layer.cornerRadius = 8;
    _bgView.layer.shadowOffset = CGSizeMake(0,2);//shadowOffset阴影偏移,x向右偏移，y向下偏移，默认(0, -3)
    _bgView.layer.shadowOpacity = 1;//阴影透明度，默认0
    _bgView.layer.shadowRadius = 7;//阴影半径，默认3
    
}


- (void)setType:(LiveType)type
{
    _type = type;
    NSString *icon_name = nil;
    NSString *title = nil;
    switch (type) {
        case LiveType_JJKB:
            icon_name = @"icon_waittingLive";
            title = @"即将开播";
            _time.text = @"倒计时 1:05:36";
            _time.textColor = RZ_COLOR(233, 42, 42);
            _des1.hidden = YES;
            break;
            
        case LiveType_ZZZB:
            icon_name = @"icon_live";
            title = @"正在直播";
            _time.text = @"已直播20分钟";
            _time.textColor = RZ_COLOR(52, 131, 251);
            _des1.hidden = NO;
            break;
    }
    _icon.image = [UIImage imageNamed:icon_name];
    _title.text = title;
    
}
@end
